package com.zpark.sports.service;

import com.zpark.sports.pojo.BasketballMallUser;
import com.zpark.sports.service.exception.SportsUserRegException;
import com.zpark.sports.service.exception.SportsUsernameRegisteredException;


public interface IUserService {

    /**
     * 用户注册
     * @param user 用户数据
     * @return 受影响的行数
     * @throws SportsUsernameRegisteredException 用户名已经被注册异常
     * @throws SportsUserRegException 用户注册失败异常
     */
    Integer addUser(BasketballMallUser user) throws SportsUsernameRegisteredException, SportsUserRegException;

    /**
     * 用户登录接口
     * @param uname 用户输入的名字
     * @param pwd 用户输入的密码
     * @return 用户数据
     */
    BasketballMallUser userLogin(String uname, String pwd);
}
